-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to define the VarInfo interface #36
Conversation
Codecov Report
@@ Coverage Diff @@
## main #36 +/- ##
==========================================
- Coverage 83.05% 77.77% -5.28%
==========================================
Files 1 1
Lines 59 108 +49
==========================================
+ Hits 49 84 +35
- Misses 10 24 +14
Continue to review full report at Codecov.
|
varinfo-interface.md
Outdated
|
||
```julia | ||
vi[@varname(x[1])] == 1 | ||
vi[@varname(x[1])].meta["bla"] == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do this by more lenses?
vi[meta(@varname(x[1]), "bla")] == false
where meta(...)
constructs a lens specially made for metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTOH, @yebai, this (or rather, the "defaulting" behaviour of the original varname) would violate a lens invariant we'd like to have:
vi[vn ∘ meta(:bla)] != get(vi[vn], meta(:bla))
Co-authored-by: Hong Ge <[email protected]>
Pull Request Test Coverage Report for Build 1353658861Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Mostly the dictionary part of it. I am strongly leaning to adopting the Dictionaries.jl way.